package com.libre.auth.controller;

import com.libre.common.base.BaseController;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

/**
* @description   数据权限表
* @author        庞留杰
* @date          2022/01/18 18:08
* @version       V1.0
**/
@Slf4j
@RequestMapping("/permissionApi")
@RestController
public class PermissionApiController  extends BaseController {

//    @Autowired
//    private PermissionApiService service;
//
//    @ApiOperation(value = "通过权限资源ID查询", notes = "通过权限资源ID查询")
//    @GetMapping("/findByPermissionId")
//    public Result<List<PermissionApi>> findByPermissionId(String permission_id) {
//        List<PermissionApi> list = service.findByPermissionId(permission_id);
//        return new ResultUtil<List<PermissionApi>>().setData(list);
//    }
//
//
//    @ApiOperation(value = "删除", notes = "删除【逻辑删除】")
//    @PostMapping("/delete/{id}")
//    public Result delete(@PathVariable String id) {
//        boolean boo = service.delete(id);
//        if(boo){
//            return new ResultUtil().setSuccessMsg(ResultEnums.OK.getReasonPhraseCN());
//        }else {
//            return new ResultUtil().setErrorMsg(ResultEnums.FAIL.getReasonPhraseCN());
//        }
//    }
//
//    @ApiOperation(value = "添加数据权限", notes = "添加")
//    @PostMapping("/edit")
//    public Result edit(@RequestBody PermissionApi permissionApi) {
//        boolean boo = service.edit(permissionApi);
//        if(boo){
//            return new ResultUtil().setSuccessMsg(ResultEnums.OK.getReasonPhraseCN());
//        }else {
//            return new ResultUtil().setErrorMsg(ResultEnums.FAIL.getReasonPhraseCN());
//        }
//    }

}
